load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
    name = "roachvet_lib",
    srcs = ["main.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/cmd/roachvet",
    visibility = ["//visibility:private"],
    deps = [
        "//pkg/testutils/lint/passes/deferunlockcheck",
        "//pkg/testutils/lint/passes/errcmp",
        "//pkg/testutils/lint/passes/errwrap",
        "//pkg/testutils/lint/passes/fmtsafe",
        "//pkg/testutils/lint/passes/forbiddenmethod",
        "//pkg/testutils/lint/passes/hash",
        "//pkg/testutils/lint/passes/leaktestcall",
        "//pkg/testutils/lint/passes/nilness",
        "//pkg/testutils/lint/passes/nocopy",
        "//pkg/testutils/lint/passes/redactcheck",
        "//pkg/testutils/lint/passes/returnerrcheck",
        "//pkg/testutils/lint/passes/timer",
        "//pkg/testutils/lint/passes/unconvert",
        "@org_golang_x_tools//go/analysis",
        "@org_golang_x_tools//go/analysis/passes/asmdecl",
        "@org_golang_x_tools//go/analysis/passes/assign",
        "@org_golang_x_tools//go/analysis/passes/atomic",
        "@org_golang_x_tools//go/analysis/passes/bools",
        "@org_golang_x_tools//go/analysis/passes/buildtag",
        "@org_golang_x_tools//go/analysis/passes/cgocall",
        "@org_golang_x_tools//go/analysis/passes/composite",
        "@org_golang_x_tools//go/analysis/passes/copylock",
        "@org_golang_x_tools//go/analysis/passes/errorsas",
        "@org_golang_x_tools//go/analysis/passes/httpresponse",
        "@org_golang_x_tools//go/analysis/passes/lostcancel",
        "@org_golang_x_tools//go/analysis/passes/nilfunc",
        "@org_golang_x_tools//go/analysis/passes/printf",
        "@org_golang_x_tools//go/analysis/passes/shadow",
        "@org_golang_x_tools//go/analysis/passes/shift",
        "@org_golang_x_tools//go/analysis/passes/stdmethods",
        "@org_golang_x_tools//go/analysis/passes/structtag",
        "@org_golang_x_tools//go/analysis/passes/tests",
        "@org_golang_x_tools//go/analysis/passes/unmarshal",
        "@org_golang_x_tools//go/analysis/passes/unreachable",
        "@org_golang_x_tools//go/analysis/passes/unsafeptr",
        "@org_golang_x_tools//go/analysis/passes/unusedresult",
        "@org_golang_x_tools//go/analysis/unitchecker",
    ],
)

go_binary(
    name = "roachvet",
    embed = [":roachvet_lib"],
    visibility = ["//visibility:public"],
)
